//
//  DYMemberBillCell.m
//  kafuMerchant
//
//  Created by 帝云科技 on 2018/9/19.
//  Copyright © 2018年 帝云科技. All rights reserved.
//

#import "DYMemberBillCell.h"

@interface DYMemberBillCell ()

@property (nonatomic,strong)UIView *circleView;
@property (nonatomic,strong)UILabel *nameLabel;
@property (nonatomic,strong)UIButton *timeButton;
@property (nonatomic,strong)UILabel *line;
@property (nonatomic,strong)UILabel *moneyLabel;
@property (nonatomic,strong)UILabel *wayLabel;
@property (nonatomic,strong)UILabel *balanceLabel;
@property (nonatomic,strong)UILabel *desLabel;

@end

@implementation DYMemberBillCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
-(void)dy_initUI
{
    [super dy_initUI];
    
    self.hideSeparatorLabel=YES;
    [self xhq_noneSelectionStyle];
    
    self.circleView = ({
        UIView *view=[[UIView alloc]init];
        view.backgroundColor=[UIColor xhq_base];
        [view xhq_cornerRadius:BILIWIDTH(2)];
        view;
    });
    self.nameLabel = ({
        UILabel *label=[Utils labelWithTitleFontSize:12 textColor:[UIColor xhq_content] alignment:0];
        label;
    });
    
    self.timeButton = ({
        UIButton *button=[Utils createBtnWithType:UIButtonTypeCustom backgroundColor:ClearColor title:@"时间" image:@"icon_meditor_time" font:12];
        [button setTitleColor:[UIColor xhq_content] forState:UIControlStateNormal];
        button;
    });
    
    self.line= ({
        UILabel *line=[UILabel xhq_lineLabel];
        line;
    });
    
    self.moneyLabel= ({
        UILabel *label=[Utils labelWithTitleFontSize:14 textColor:[UIColor xhq_aTitle] alignment:0];
        label;
    });
    
    self.wayLabel= ({
        UILabel *label=[Utils labelWithTitleFontSize:14 textColor:[UIColor xhq_aTitle] alignment:0];
        label;
    });
    
    self.balanceLabel= ({
        UILabel *label=[Utils labelWithTitleFontSize:14 textColor:[UIColor xhq_aTitle] alignment:0];
        label;
    });
    
    self.desLabel= ({
        UILabel *label=[Utils labelWithTitleFontSize:14 textColor:[UIColor xhq_aTitle] alignment:0];
        label;
    });
    
    [self addSubview:self.circleView];
    [self addSubview:self.nameLabel];
    [self addSubview:self.timeButton];
    [self addSubview:self.line];
    [self addSubview:self.moneyLabel];
    [self addSubview:self.wayLabel];
    [self addSubview:self.balanceLabel];
    [self addSubview:self.desLabel];
    
    [self.circleView makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(BILIWIDTH(8));
        make.centerY.equalTo(self.nameLabel);
        make.width.height.equalTo(BILIWIDTH(4));
    }];
    
    [self.nameLabel makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.circleView.right).offset(BILIWIDTH(3));
        make.top.equalTo(0);
        make.height.equalTo(BILIHEIGHT(35));
        make.right.equalTo(self.timeButton.left).offset(BILIWIDTH(-5));
    }];
    
    [self.timeButton makeConstraints:^(MASConstraintMaker *make) {
        make.right.equalTo(BILIWIDTH(-10));
        make.centerY.equalTo(self.nameLabel);
    }];
    
    [self.line makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(BILIWIDTH(8));
        make.right.equalTo(BILIWIDTH(-8));
        make.top.equalTo(self.nameLabel.bottom);
        make.height.equalTo(BILIWIDTH(0.7));
    }];
    
    [self.moneyLabel makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.line);
        make.top.equalTo(self.line.bottom).offset(BILIHEIGHT(15));
        make.right.equalTo(BILIWIDTH(-10));
    }];
    
    [self.balanceLabel makeConstraints:^(MASConstraintMaker *make) {
        make.left.equalTo(self.moneyLabel);
        make.top.equalTo(self.moneyLabel.bottom).offset(BILIHEIGHT(13));
        make.right.equalTo(self.moneyLabel);
    }];
    
    [self.wayLabel makeConstraints:^(MASConstraintMaker *make) {
        make.right.left.equalTo(self.moneyLabel);
        make.top.equalTo(self.balanceLabel.bottom).offset(BILIHEIGHT(13));
    }];
    
    [self.desLabel makeConstraints:^(MASConstraintMaker *make) {
        make.right.left.equalTo(self.moneyLabel);
        make.top.equalTo(self.wayLabel.bottom).offset(BILIHEIGHT(13));
    }];
    
    
    self.nameLabel.text=@"会员昵称：一个个";
    [self.timeButton setTitle:@"2018-09-09 13:23:44" forState:UIControlStateNormal];
    
    [self.timeButton placeImageTitlePosition:ZYButtonImagePositionLeft space:BILIWIDTH(5)];
    
    self.moneyLabel.text=@"交易金额：%300.00";
    self.wayLabel.text=@"交易类型：充值";
    self.balanceLabel.text=@"卡内余额：¥2000.00";
    self.desLabel.text=@"交易说明：哥哥和各国和各哦改喝哦个哦";
    
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
